package com.scholarship.common.utils;

import org.apache.shiro.crypto.hash.SimpleHash;

/**
 * @Author Z.J.H
 * @create 2021/9/6 17:12
 */
public class CommonUtil {

    /**
     * shiro自带的MD5盐值加密
     * @param password
     * @param salt userId作为盐值
     * @return
     */
    public static String encryptPassword(String password,String salt) {
        //加密1024次
        return String.valueOf(new SimpleHash("MD5",password,salt,1024));
    }
}
